# -*- coding: utf-8 -*-

'''
Created on Apr 13, 2010

@author: Krzysztof Langner
'''

class Worksheet(object):
    '''
    Worksheet solution
    '''
    _solution = []

    TYPE_EXPRESSION = 1;
    TYPE_COMMENT = 2;
    TYPE_PROMPT = 3;
    
    
    def __init__(self):
        '''
        Constructor
        '''
        

    def add(self, type, data):
        '''
        Wyświetla rozwiązanie na konsoli
        '''
        self._solution.append( (type, data) )
        
        
    def __str__(self):
        
        output = ""
        
        for (type, data) in self._solution:
            output += str(data) + "\n"
        
        return output